Question: Let $P$ be the plane passing through the origin with normal vector $\begin{pmatrix} 1 \\ 1 \\ -1 \end{pmatrix}.$  Find the matrix $\mathbf{R}$ such that for any vector $\mathbf{v},$ $\mathbf{R} \mathbf{v}$ is the reflection of $\mathbf{v}$ through plane $P.$
Let $\mathbf{v} = \begin{pmatrix} x \\ y \\ z \end{pmatrix},$ and let $\mathbf{p}$ be the projection of $\mathbf{p}$ onto plane $P.$  Then $\mathbf{v} - \mathbf{p}$ is the projection of $\mathbf{v}$ onto the normal vector $\mathbf{n} = \begin{pmatrix} 1 \\ 1 \\ -1 \end{pmatrix}.$

[asy]
import three;

size(160);
currentprojection = perspective(6,3,2);

triple I = (1,0,0), J = (0,1,0), K = (0,0,1);
triple O = (0,-0.5,0), V = (0,1.5,1), P = (0,1.5,0);

draw(surface((2*I + 2*J)--(2*I - 2*J)--(-2*I - 2*J)--(-2*I + 2*J)--cycle),paleyellow,nolight);
draw((2*I + 2*J)--(2*I - 2*J)--(-2*I - 2*J)--(-2*I + 2*J)--cycle);
draw((P + 0.1*(O - P))--(P + 0.1*(O - P) + 0.2*(V - P))--(P + 0.2*(V - P)));
draw(O--P,green,Arrow3(6));
draw(O--V,red,Arrow3(6));
draw(P--V,blue,Arrow3(6));
draw((1,-0.8,0)--(1,-0.8,0.2)--(1,-1,0.2));
draw((1,-1,0)--(1,-1,2),magenta,Arrow3(6));

label("$\mathbf{v}$", V, N, fontsize(10));
label("$\mathbf{p}$", P, S, fontsize(10));
label("$\mathbf{n}$", (1,-1,1), dir(180), fontsize(10));
label("$\mathbf{v} - \mathbf{p}$", (V + P)/2, E, fontsize(10));
[/asy]

Thus,
\[\mathbf{v} - \mathbf{p} = \frac{\begin{pmatrix} x \\ y \\ z \end{pmatrix} \cdot \begin{pmatrix} 1 \\ 1 \\ -1 \end{pmatrix}}{\begin{pmatrix} 1 \\ 1 \\ -1 \end{pmatrix} \cdot \begin{pmatrix} 1 \\ 1 \\ -1 \end{pmatrix}} \begin{pmatrix} 1 \\ 1 \\ -1 \end{pmatrix} = \frac{x + y - z}{3} \begin{pmatrix} 1 \\ 1 \\ -1 \end{pmatrix} = \renewcommand{\arraystretch}{1.5} \begin{pmatrix} \frac{x + y - z}{3} \\ \frac{x + y - z}{3} \\ -\frac{x + y - z}{3} \end{pmatrix} \renewcommand{\arraystretch}{1}.\]Then
\[\mathbf{p} = \begin{pmatrix} x \\ y \\ z \end{pmatrix} - \renewcommand{\arraystretch}{1.5} \begin{pmatrix} \frac{x + y - z}{3} \\ \frac{x + y - z}{3} \\ -\frac{x + y - z}{3} \end{pmatrix} \renewcommand{\arraystretch}{1} = \renewcommand{\arraystretch}{1.5} \begin{pmatrix} \frac{2x - y + z}{3} \\ \frac{-x + 2y + z}{3} \\ \frac{x + y + 2z}{3} \end{pmatrix} \renewcommand{\arraystretch}{1}.\]Now, let $\mathbf{r}$ be the reflection of $\mathbf{v}$ through plane $P.$

[asy]
import three;

size(160);
currentprojection = perspective(6,3,2);

triple I = (1,0,0), J = (0,1,0), K = (0,0,1);
triple O = (0,-0.5,0), V = (0,1.5,1), P = (0,1.5,0), R = (0,1.5,-1);

draw(surface((2*I + 2*J)--(2*I - 2*J)--(-2*I - 2*J)--(-2*I + 2*J)--cycle),paleyellow,nolight);
draw((2*I + 2*J)--(2*I - 2*J)--(-2*I - 2*J)--(-2*I + 2*J)--cycle);
draw((P + 0.1*(O - P))--(P + 0.1*(O - P) + 0.2*(V - P))--(P + 0.2*(V - P)));
draw(O--P,green,Arrow3(6));
draw(O--V,red,Arrow3(6));
draw(P--V,blue,Arrow3(6));
draw((1,-0.8,0)--(1,-0.8,0.2)--(1,-1,0.2));
draw((1,-1,0)--(1,-1,2),magenta,Arrow3(6));
draw(O--R,dashed,Arrow3(6));
draw(R--P,dashed);

label("$\mathbf{v}$", V, N, fontsize(10));
label("$\mathbf{p}$", P, E, fontsize(10));
label("$\mathbf{n}$", (1,-1,1), dir(180), fontsize(10));
label("$\mathbf{v} - \mathbf{p}$", (V + P)/2, E, fontsize(10));
label("$\mathbf{r}$", R, S);
[/asy]

Then $\mathbf{p}$ is the midpoint of $\mathbf{v}$ and $\mathbf{r},$ so
\[\mathbf{p} = \frac{\mathbf{v} + \mathbf{r}}{2}.\]We can solve for $\mathbf{r},$ to find $\mathbf{r} = 2 \mathbf{p} - \mathbf{v}.$  Then
\[\mathbf{r} = 2 \renewcommand{\arraystretch}{1.5} \begin{pmatrix} \frac{2x - y + z}{3} \\ \frac{-x + 2y + z}{3} \\ \frac{x + y + 2z}{3} \end{pmatrix} \renewcommand{\arraystretch}{1} - \begin{pmatrix} x \\ y \\ z \end{pmatrix} = \renewcommand{\arraystretch}{1.5} \begin{pmatrix} \frac{x - 2y + 2z}{3} \\ \frac{-2x + y + 2z}{3} \\ \frac{2x + 2y + z}{3} \end{pmatrix} \renewcommand{\arraystretch}{1} = \renewcommand{\arraystretch}{1.5} \begin{pmatrix} \frac{1}{3} & -\frac{2}{3} & \frac{2}{3} \\ -\frac{2}{3} & \frac{1}{3} & \frac{2}{3} \\ \frac{2}{3} & \frac{2}{3} & \frac{1}{3} \end{pmatrix} \renewcommand{\arraystretch}{1} \begin{pmatrix} x \\ y \\ z \end{pmatrix}.\]Hence,
\[\mathbf{R} = \boxed{\begin{pmatrix} \frac{1}{3} & -\frac{2}{3} & \frac{2}{3} \\ -\frac{2}{3} & \frac{1}{3} & \frac{2}{3} \\ \frac{2}{3} & \frac{2}{3} & \frac{1}{3} \end{pmatrix}}.\]